﻿using System.Windows;


namespace MPE
{
    public partial class IndentSettings : Window
    {
        Properties.Settings param = Properties.Settings.Default;

        public IndentSettings()
        {
            InitializeComponent();

            IFAutoIndentCB.IsChecked = param.indentBools[0] == '1';

            ELSEAutoIndentCB.IsChecked = param.indentBools[1] == '1';
        }
        void IFAutoIndentCB_Click(object sender, RoutedEventArgs e)
        {
            param.indentBools = param.indentBools.Remove(0, 1); param.indentBools = param.indentBools.Insert(0, IFAutoIndentCB.IsChecked == true ? "1" : "0");
            param.Save();
        }
        void ELSEAutoIndentCB_Click(object sender, RoutedEventArgs e)
        {
            param.indentBools = param.indentBools.Remove(1, 1); param.indentBools = param.indentBools.Insert(1, ELSEAutoIndentCB.IsChecked == true ? "1" : "0");
            param.Save();
        }  
        void Window_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) => DragMove();
    }
}